<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta
      name="description"
      content="基于 Vue3.x + TypeScript 的在线演示文稿（幻灯片）应用，还原了大部分 Office PowerPoint 常用功能，实现在线PPT的编辑、演示。支持导出PPT文件。"
    />
    <meta
      name="keywords"
      content="ppt,powerpoint,office powerpoint,在线ppt,幻灯片,演示文稿,ppt在线制作,Vue3,TypeScript"
    />
    <title>PPT</title>

    <style>
      .first-screen-loading {
        width: 200px;
        height: 200px;
        position: fixed;
        top: 50%;
        left: 50%;
        margin-top: -100px;
        margin-left: -100px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        /* background-color: #ffffff;
        border-radius: 15px; */
      }
      .first-screen-loading-spinner {
        width: 36px;
        height: 36px;
        border: 3px solid #0b67f1;
        border-top-color: transparent;
        border-radius: 50%;
        animation: spinner 0.8s linear infinite;
      }
      .first-screen-loading-text {
        margin-top: 20px;
        color: #333333;
      }
      @keyframes spinner {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(360deg);
        }
      }
    </style>
    <script
      type="text/javascript"
      src="//wap.cmread.com/rbc/t/content/repository/ues/js/s109/vconsole.js"
    ></script>
    <!--  <script type="text/javascript">
      var vConsole = new VConsole();
    </script> -->

    <!-- 动态加载小程序 JS-SDK 的脚本 -->
    <script type="text/javascript">
      var userAgent = navigator.userAgent
      if (userAgent.indexOf('AlipayClient') > -1) {
        // 支付宝小程序的 JS-SDK 防止 404 需要动态加载，如果不需要兼容支付宝小程序，则无需引用此 JS 文件。
        document.writeln(
          '<script src="https://appx/web-view.min.js"' +
            '>' +
            '<' +
            '/' +
            'script>'
        )
      } else if (/QQ/i.test(userAgent) && /miniProgram/i.test(userAgent)) {
        // QQ 小程序
        document.write(
          '<script type="text/javascript" src="https://qqq.gtimg.cn/miniprogram/webview_jssdk/qqjssdk-1.0.0.js"><\/script>'
        )
      } else if (
        /miniProgram/i.test(userAgent) &&
        /micromessenger/i.test(userAgent)
      ) {
        // 微信小程序 JS-SDK 如果不需要兼容微信小程序，则无需引用此 JS 文件。
        document.write(
          '<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"><\/script>'
        )
      } else if (/toutiaomicroapp/i.test(userAgent)) {
        // 头条小程序 JS-SDK 如果不需要兼容头条小程序，则无需引用此 JS 文件。
        document.write(
          '<script type="text/javascript" src="https://lf1-cdn-tos.bytegoofy.com/goofy/developer/jssdk/jssdk-1.1.0.js"><\/script>'
        )
      } else if (/swan/i.test(userAgent)) {
        // 百度小程序 JS-SDK 如果不需要兼容百度小程序，则无需引用此 JS 文件。
        document.write(
          '<script type="text/javascript" src="https://b.bdstatic.com/searchbox/icms/searchbox/js/swan-2.0.18.js"><\/script>'
        )
      } else if (/quickapp/i.test(userAgent)) {
        // quickapp
        document.write(
          '<script type="text/javascript" src="https://quickapp/jssdk.webview.min.js"><\/script>'
        )
      }
      if (
        !/toutiaomicroapp/i.test(userAgent) &&
        document.querySelector('.post-message-section')
      ) {
        document.querySelector('.post-message-section').style.visibility =
          'visible'
      }
    </script>
  </head>
  <body>
    <div id="app">
      <div class="first-screen-loading">
        <div class="first-screen-loading-spinner"></div>
        <div class="first-screen-loading-text"></div>
      </div>
    </div>
    <script type="module" src="/src/main.ts"></script>
  </body>

  <script>
    document.oncontextmenu = (e) => e.preventDefault()
    const textBox = document.getElementsByClassName(
      'first-screen-loading-text'
    )[0]
    const urlParams = new URLSearchParams(window.location.search)
    let urlLang = urlParams.get('lan')
    if (urlLang) {
      if (urlLang === 'en') {
        textBox.textContent = 'Loading, please wait...'
        sessionStorage.setItem('lang', 'en')
      } else {
        textBox.textContent = '正在加载中，请稍等...'
        sessionStorage.setItem('lang', 'zh')
      }
    } else {
      textBox.textContent = '正在加载中，请稍等...'
    }
  </script>
</html>
